package com.ruoyi.dgw.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dgw.mapper.FodderMapper;
import com.ruoyi.dgw.domain.Fodder;
import com.ruoyi.dgw.service.IFodderService;

/**
 * 饲料Service业务层处理
 * 
 * @author ll
 * @date 2022-01-07
 */
@Service
public class FodderServiceImpl implements IFodderService 
{
    @Autowired
    private FodderMapper fodderMapper;

    /**
     * 查询饲料
     * 
     * @param id 饲料主键
     * @return 饲料
     */
    @Override
    public Fodder selectFodderById(Long id)
    {
        return fodderMapper.selectFodderById(id);
    }

    /**
     * 查询饲料列表
     * 
     * @param fodder 饲料
     * @return 饲料
     */
    @Override
    public List<Fodder> selectFodderList(Fodder fodder)
    {
        return fodderMapper.selectFodderList(fodder);
    }

    /**
     * 新增饲料
     * 
     * @param fodder 饲料
     * @return 结果
     */
    @Override
    public int insertFodder(Fodder fodder)
    {
        return fodderMapper.insertFodder(fodder);
    }

    /**
     * 修改饲料
     * 
     * @param fodder 饲料
     * @return 结果
     */
    @Override
    public int updateFodder(Fodder fodder)
    {
        return fodderMapper.updateFodder(fodder);
    }

    /**
     * 批量删除饲料
     * 
     * @param ids 需要删除的饲料主键
     * @return 结果
     */
    @Override
    public int deleteFodderByIds(Long[] ids)
    {
        return fodderMapper.deleteFodderByIds(ids);
    }

    /**
     * 删除饲料信息
     * 
     * @param id 饲料主键
     * @return 结果
     */
    @Override
    public int deleteFodderById(Long id)
    {
        return fodderMapper.deleteFodderById(id);
    }
}
